package com.gateway.video.rtsp.stream.pull;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import org.bytedeco.javacv.FFmpegFrameGrabber;

public class PullSource {
    public static final PullSource INSTANCE = new PullSource();

    public static PullSource getInstance() {
        return INSTANCE;
    }

    public FFmpegFrameGrabber grabber;

    private final Cache<String, FFmpegFrameGrabber> cahce = CacheBuilder.newBuilder().maximumSize(1000).build();

    public void register(FFmpegFrameGrabber grabber) {
        this.grabber = grabber;
    }

    public FFmpegFrameGrabber getGrabber() {
        return this.grabber;
    }
}
